/**
 * 首页子应用（首页路由）
 */

const express = require('express')
const article = require('../middlelware/article')
// 首页子应用
// const indexApp = express()
const indexApp = express.Router()

indexApp.get('/', [article.getHot,function(req, res, next){
    console.log('来了-------');
    next()
}], (req, res) => {
    let { hots } = req
    res.render('index', { hots: hots })
})

module.exports = indexApp